home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-01-16 | 2.5 KB | 53 lines | [TEXT/MPS ] |
- Macintosh
- Sample Code Notes
- _____________________________________________________________________________
- Developer Technical Support
- #18: StdFile
-
- Written by: Keith Rollin
-
- Versions: 1.00 April 1989
-
- Components: StdFile.c April 1, 1989
- StdFile.p April 1, 1989
- StdFile.h April 1, 1989
- StdFile.r April 1, 1989
- StdFile.rsrc April 1, 1989
- CStdFile.make April 1, 1989
- PStdFile.make April 1, 1989
- _____________________________________________________________________________
-
- StdFile attempts to demonstrate the following techniques:
-
- o Normal use of SFGetFile and SFPutFile.
- o Normal use of SFPGetFile and SFPPutFile, which includes the use of
- custom dialogs and handling extra items through the implementation of a
- DlgHook.
- o First time initialization.
- o Extra simple buttons (Quit, Directory, ThisDir).
- o Radio buttons (file format, types of files to show).
- o Aliasing—click on some buttons to click on other buttons.
- o Regenerating the list of files displayed.
- o Creating a full pathname from a reply record (using working directories
- or DirID)
- o Selecting a directory (Ă la MPWs "GetFileName -d")
- o Simple file filter (checks file type).
- o Complex file filter (looking inside the file).
- o Adding and deleting List Manager lists and extra List Manager lists.
- This is shown for both SFGetFile and SFPutFile.
- o Select multiple files using one of two methods.
- o Replace StdFile's list with one of your own.
- o Add a second list to the dialog box. This method is not shown
- explicitly, but rather, I show how to install and dispose of the
- actual list item. Inserting filenames into the list is left as
- an exercise to you, the programmer.
- o Setting the starting directory or volume.
- o Describe pending update event clogging.
-
- Note: This application assumes the existence of HFS. It makes HFS calls
- and accesses HFS data structures without first checking to see if
- HFS exists on this machine.
- In some cases, you will see me make use of a peculiar Pascal syntax:
- IF <expr> THEN;. This is intentional, as it gets the Pascal compiler
- to discard function results in which I have no interest.
-